/**************************************************************
  > File Name: 2.c
  > Author: LuoLiang
  > Mail: 1204553475@qq.com 
  > Created Time: 2022年01月24日 星期一 14时56分37秒
 **************************************************************/

#include <stdio.h>
#include <stdlib.h>

int Fibonacci(int n)
{
	if (n == 1 || n == 2)
		return 1;
	int prev1 = 1;
	int prev2 = 1;
	int cur = 0;

	for (int i = 2; i < n; i++)
	{
		cur = prev1 + prev2;
		prev2 = prev1;
		prev1 = cur;
	}
	return cur;
}

int main(int argc,char **argv)
{
	int n, ret;

	scanf("%d",&n);
	ret = Fibonacci(n);	
	printf("%d\n",ret);

    exit(0);
}
